You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Review implementation for correctness, style, tests
Post review feedback
Overall this is a clean, well-documented addition that follows the existing pattern used by worldcover.py (S3-hosted unsigned bucket + cached tiles.geojson/grid index + DirectMaterializeDataSource). Docs, config example, and tests (mocked integration + online) all look solid.
Bug: timeout parameter is unused
In rslearn/data_sources/meta_canopy_height.py:
__init__ (line 85) accepts timeout: timedelta = timedelta(seconds=60) and docs it as "timeout for HTTP requests" (line 92), and stores it as self.timeout (line 96).
However, self.timeout is never referenced anywhere else in the file. The boto3.client(...) call in _load_index (lines 119–125) that downloads tiles.geojson doesn't pass connect_timeout/read_timeout into botocore.client.Config(...), and there's no ingest() override (unlike worldcover.py, which actually uses self.timeout.total_seconds() in its requests.get call during ingest()) where it could otherwise be wired in.
Net effect: the timeout constructor argument is dead — changing it has zero effect on behavior. This looks like leftover boilerplate copied from worldcover.py's constructor without carrying over an actual use site.
Suggested fix: either apply it via botocore.client.Config(connect_timeout=.., read_timeout=..) for the s3.get_object call, or drop the unused parameter (and the timeout field/docstring) if it's not actually needed for this data source (since materialize reads go through rasterio/GDAL, not a timeout-able requests call).
docs/data_sources/meta_canopy_height_MetaCanopyHeightV2.md and the module docstring both correctly note "ingest": false is required — good, matches the fact this only implements DirectMaterializeDataSource.
The in-memory _grid_index/_items_by_name cache plus the on-disk tiles.geojson cache follow the exact same (pre-existing) pattern as worldcover.py, including the same benign race if multiple processes populate the cache concurrently (redundant download, but atomic rename avoids corruption) — not a new issue introduced by this PR.
Tests look good: mocked S3 client for unit/integration tests, plus an online test against the real bucket for an end-to-end sanity check.
Note: I wasn't able to execute ruff/pytest in this sandbox (commands required approval that wasn't available), so I couldn't confirm lint/test pass locally — this was a read-through review only. If you'd like me to actually run the test suite, please enable Bash execution in --allowedTools.
The reason will be displayed to describe this comment to others. Learn more.
self.timeout unused per Claude
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add meta canopy height v2: https://arxiv.org/pdf/2603.06382, the final product is 1m and the high-resolution images are mostly from 2018-2020